function fig1_9

nt=200;
t=linspace(0,2,nt);

clf
% get(gcf)
set(gcf,'Position', [25 1115 658 230])
co = [0 0 1;
    0 0.5 0;
    1 0 0;
    0 0.75 0.75;
    0.75 0 0.75;
    0.75 0.75 0;
    0.25 0.25 0.25];
set(groot,'defaultAxesColorOrder',co)
subaxis(1,1,1,1,'MT',0.01,'MB',0.2,'MR',-0.01,'ML',0.05,'P',0.04)

ep=0.1;
for it=1:nt
    ya1(it)=t(it)*(1-0.5*t(it));
    ya2(it)=ya1(it)+ep*t(it)^3*(1-0.25*t(it))/3;
end

%  exact
y10=0; y20=1;
y0=[y10 y20];
[tt,yy] = ode45(@rhs,[0 2],y0);
%[t,y] = ode23s(@rhs,[0 2],y0);

hold on

plot(t,ya1,'-.','Linewidth',1.5,'Color',[0 0.6 0.3])
plot(t,ya2,'r','Linewidth',1.3)
plot(tt,yy(:,1),'--b','Linewidth',1.7)

box on
grid on
axis([0 2 0 0.6])

%xlabel('\tau - axis','FontWeight','bold')

set(gca,'ytick',[0 0.2 0.4 0.6])
ax = gca;
ax.XAxis.TickLabelInterpreter = 'latex';
ax.YAxis.TickLabelInterpreter = 'latex';
set(gca,'FontSize',13)

ylabel('Solution','Interpreter','latex','FontSize',14)
xlabel('$\tau$\,-\,axis','Interpreter','latex','FontSize',14)
legend('$\,  y_0$','$\, y_0+\varepsilon y_1$',' Numerical Solution \,','Location','South','FontSize',13,'Interpreter','latex')

%exportgraphics(gcf,'/Users/mark/Desktop/fig15.pdf')

%  define f(t,y)
function dy=rhs(t,y)
dy=zeros(2,1);
ep=0.1;
dy(1) = y(2);
dy(2) = -1/(1+ep*y(1))^2;





